package com.ophiux.utils.parser;

import java.util.SortedMap;
import com.ophiux.utils.exception.OphiuxApiException;

public interface IConvert {

	/**
	 * 
	 * @param clzz   
	 * @param dataSource   
	 * @return
	 */
	public <T> T toEntity(Class<T> clzz,String dataSource) throws OphiuxApiException;
	
	/**
	 * 将实体转换为字符串,XML/JSON
	 * @param obj
	 * @return  转换后的字符串
	 * @throws OphiuxApiException
	 */
	public <T> String entityToString(T obj) throws OphiuxApiException;
	
	/**
	 * 对象转Map，仅仅适用转换键不重复的
	 * @author hhl
	 * @param obj
	 * @return
	 * @throws OphiuxWeChatPaySDKException
	 */
	public <T> SortedMap entityToMap(T obj) throws OphiuxApiException;
}
